@echo off
title Deploying Job Executor...
echo Deploying Job Executor...

cd .\nimbus-job
echo.
echo Image Build..............
docker build -t regwmsuat.azurecr.io/nimbus/job:latest .

echo.
echo Image Push..............
docker push regwmsuat.azurecr.io/nimbus/job:latest

echo.
echo K8s Deploy..............
kubectl apply -f ..\k8s\test\job\manifest.yml
kubectl rollout restart deployment nimbus-job -n nimbus
timeout /nobreak /t 5

echo.
echo Delete Image..............
docker rmi regwmsuat.azurecr.io/nimbus/job:latest
